import request from "@/utils/request"
//获取分类
export const getCategoryApi = (params = {}) => {
    return request.get('/misc/category', { params })
}

export const createCategoryApi = (data) => {
    return request.post('/misc/category', data)
}

export const deleteCategoryApi = (data) => {
    return request.delete(`/misc/category`, {
        params: data
    })
}

//公司常量
export const getCompanyConstantApi = (params = {}) => {
    return request.get('/key_value/', { params })
}

export const createCompanyConstantApi = (data) => {
    return request.post('/key_value/', data)
}

export const deleteCompanyConstantApi = (data) => {
    return request.delete(`/key_value/`, {
        params: data
    })
}

export const updateCompanyConstantApi = (data) => {
    return request.patch('/key_value/', data)
}